package edu.pku.sei.transformation.tgg.adapter;

import java.util.ArrayList;
import java.util.List;

import edu.pku.sei.transformation.editor.model.Domain;
import edu.pku.sei.transformation.tgg.rule.IDomain;
import edu.pku.sei.transformation.tgg.rule.IModelParameter;
import edu.pku.sei.transformation.tgg.rule.INode;

public class DomainAdapter implements IDomain {
	Domain element;
	IModelParameter typedModel;
	List<INode> nodes = new ArrayList<INode>();

	public DomainAdapter(Domain d, IModelParameter p) {
		this.element = d;
		this.typedModel = p;
	}

	@Override
	public String getName() {
		return element.getTypedModel().getName();
	}

	@Override
	public IModelParameter getTypedModel() {
		return typedModel;
	}

	@Override
	public String getID() {
		return String.valueOf(element.getElementID());
	}

	@Override
	public List<INode> getNodes() {
		return nodes;
	}

}
